import socket

sk = socket.socket()
sk.connect(("127.0.0.1",5000))

while True:
    msg = input("请输入需要加密的数据>>>")
    sk.send(msg.encode("utf-8"))
    if not msg:
        continue
    if msg == 'q':
        break
    get_data = sk.recv(1024)
    print(f"加密的数据>>{get_data.decode('utf-8')}")

sk.close()